//
// Created by 17775 on 2024/10/17.
//

#include "Single_CrossSectionUI.h"

Single_CrossSectionUI::Single_CrossSectionUI(QWidget *parent) : PowerProfileBase(parent){
    setTitleName("Single Measurement: Power Profile");
}

void Single_CrossSectionUI::processData(std::shared_ptr<PowerProfileData<std::vector<float>>> &data) {
    getCustomPlot()->graph(0)->setData(convertVectorToQList(data->diameterData()),convertVectorToQList(data->powerData()));
    refreshCursorRange();
    refreshViewRange();
    refreshView();
}